home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / cml-098.lha / cml-0.9.8 / install-cml < prev    next >
Encoding:
Text File  |  1991-06-23  |  789 b   |  54 lines

  1. #!/bin/sh
  2. #
  3. # COPYRIGHT (c) 1990 by John H. Reppy.  See COPYRIGHT file for details.
  4. #
  5.  
  6. CMD=$0
  7. SML=sml
  8. CML=cml
  9. LOAD="loadCML"
  10.  
  11. #
  12. # process command-line options
  13. #
  14. while test "$#" != "0"
  15. do
  16.     arg=$1
  17.     shift
  18.     case $arg in
  19.     -o)
  20.         if test "$#" = "0"
  21.         then
  22.         echo "$CMD must supply image name for -o option"
  23.         exit 1
  24.         fi
  25.         CML=$1
  26.         shift
  27.     ;;
  28.     -sml)
  29.         if test "$#" = "0"
  30.         then
  31.         echo "$CMD must supply image name for -sml option"
  32.         exit 1
  33.         fi
  34.         SML=$1
  35.         shift
  36.     ;;
  37.     -all)
  38.         LOAD="loadAll"
  39.     ;;
  40.     *)
  41.         echo "$CMD unrecognized option $arg"
  42.         exit 1
  43.     ;;
  44.     esac
  45. done
  46.  
  47. $SML <<XXXX
  48. use "load-cml";
  49. $LOAD();
  50. (exportML "$CML";
  51.   output(std_out, CML.versionName); output(std_out, chr(10));
  52.   output(std_out, System.version); output(std_out, chr(10)));
  53. XXXX
  54.